package com.njlime.sys.repository.app;

import com.njlime.core.base.repository.impl.BaseDaoImpl;
import com.njlime.core.utils.StringUtil;
import com.njlime.sys.entities.UnitWxConfig;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Dean on 2017-7-27.
 */
@Repository
public class AppUnitWxConfigDaoImpl extends BaseDaoImpl<UnitWxConfig> {

    /**
     * 根据原始id获取微信设置
     * @param wxId
     * @return
     */
    public UnitWxConfig getWxConfigByWxid(String wxId){
        StringBuilder sb = new StringBuilder();
        List<Object> arrList = new ArrayList<Object>();
        sb.append("select * from t_unit_wx_config where wx_id = ? ");
        arrList.add(wxId);
        return findOne(sb.toString(),arrList);
    }


}
